-- GENERATED SPELL FOR [Dread Weaver] --


function spell0_8528(pUnit, Event) --@Fear,n/a--
pUnit:FullCastSpellOnTarget(12542,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8528', 5500, 1)
end

function spell1_8528(pUnit, Event) --@Mind Flay,n/a--
pUnit:FullCastSpellOnTarget(16568,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8528', 3000, 1)
end

function Sorts_8528(pUnit, Event)
local choix_sorts_8528 = math.random(0, 1)
if choix_sorts_8528 == 0 then
pUnit:RegisterEvent('spell0_8528', 1, 1)
end
if choix_sorts_8528 == 1 then
pUnit:RegisterEvent('spell1_8528', 1, 1)
end
end

function mob8528_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8528', math.random(1500, 3000), 1)
end

function mob8528_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8528_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8528_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8528, 1, 'mob8528_Action')
RegisterUnitEvent(8528, 2, 'mob8528_Leave')
RegisterUnitEvent(8528, 3, 'mob8528_Kill')
RegisterUnitEvent(8528, 4, 'mob8528_Die')
